<template>
	<!-- 恩典系统工具 -->
	<view>
		<global-navgation  title="恩典系统工具"></global-navgation>
		<image src="../../static/images/1.png" mode="" class="top" @click="getuserinfo"></image>
		<view class="center">
			<image src="../../static/images/2.png" mode="" class="product1" @click='introduction'></image>
			<image src="../../static/images/3.png" mode="" class="product2"  @click="combination"></image>
			<image src="../../static/images/4.png" mode="" class="product3" @click='goToDetail'></image>
			<image src="../../static/images/5.png" mode="" class="product4" @click="recommend"></image>
			<text class="text1" @click='introduction'>产品介绍</text>
			<text class="text2" @click="combination">经典组合</text>
			<text class="text3" @click='goToDetail'>新闻中心</text>
			<text class="text4" @click="recommend">新品推荐</text>
			<view class="line1">
				
			</view>
			<view class="line2">
				
			</view>
		</view>
		<view class="Introduction" @click="company">
			<view class="text" >
				公司介绍
			</view>
			<image src="../../static/images/6.png" mode="" class="logo"></image>
		</view>
		<view class="results" @click="results">
			<view class="text" >
				科技成果
			</view>
			<image src="../../static/images/7.png" mode="" class="logo"></image>
		</view>
		<view class="block">
			
		</view>
	</view>
</template>
<script>
	import  {mapMutations} from 'vuex'
	import globalNavgation from '../../components/globalNavgation.vue'
	import { testLogin, userLogin, newInfo, login } from '@/common/login.js';
	export default{
		components:{
			globalNavgation
		},
		data(){
			return{
				token:""
			}
		},
		// mounted() {
		// 	// 初始化获取数据
		// 	this.__initClassData()			
		// },
		
			
			
		onLoad(options){
				
			if(options.token){
				
				this.token=options.token
				console.log(this.token)
			}else{
				
			}
			uni.setStorage({
					key: 'token',
					data:this.token,
					success: function() {}
				});
				uni.getStorage({
				    key: 'token',
				    success: function (res) {
				        console.log('hhh',res.data);
						this.tokens=res.data
				    }
				});
			
		},
		methods: {
			// __initClassData() {
			// 	this.$api.get({
			// 		url: '/article/article/combination_list',
			// 		data:{token:this.token}
			// 	}).then(res => {
						
						
						
			// 			console.log(res)
			// 		})
			// 	},
			// async getuserinfo() {
			//    console.log("123456")
			//    if(this.share_id){
			//     //#ifdef MP-WEIXIN
			//     await userLogin(this.share_id,this.store_id).then((res)=>{
			//      console.log(res,"9876")
			//      console.log(555555)
			//      console.log(this.$store.getters.getToken,"97654")
			     
			//     });
			//     //#endif
			//    }else{
			//     //#ifdef MP-WEIXIN
			//     await userLogin().then((res)=>{
			//      console.log(res,"9876")
			//      console.log(555555)
			//      console.log(this.$store.getters.getToken,"97654")
			//     }); 
			//     //#endif
			//    }
			//    // h5登录
			//    //#ifdef H5
			//    // location.href = this.$store.state.URL + 'login/login/wx_login?merchantID=1&page='+encodeURIComponent("/pages/edit/edit")
			//    //#endif
			//   },
			
			goToDetail(){
				uni.navigateTo({
					url:'../news/news'
				})
				
			},
			company(){
				uni.navigateTo({
					url:'../company/company'
				})
				
			},
			introduction(){
				uni.navigateTo({
					url:'../Introduction/Introduction'
				})
				
			},
			combination(){
				uni.navigateTo({
					url:'../combination/combination'
				})
			
			},
			recommend(){
				uni.navigateTo({
					url:'../recommend/recommend'
				})
				
			},
			results(){
				uni.navigateTo({
					url:'../results/results'
				})
				
			}
		}
	}
</script>

<style>
	.top{
		display: block;
		width: 100%;
		height: 400rpx;
	}
	.results{
		position: absolute;
		width: 686rpx;
		height: 160rpx;
		left: 32rpx;
		top: 1270rpx;
		
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 12rpx rgba(0, 0, 0, 0.06);
		border-radius: 16rpx;
	}
	.block{
		width: 100%;
		height: 160rpx;
		/* border: 1px solid red; */
		position: absolute;
		top: 1430rpx;
	}
	.results .logo{
		width: 212rpx;
		height: 148rpx;
		display: block;
		position: absolute;
		right: 16px;
		top: 3px;
	}
	.results .text{
		display: block;
		position: absolute;
		width: 160rpx;
		height: 56rpx;
		left: 32rpx;
		top: 52rpx;
		line-height: 56rpx;
		font-weight: bold;
		font-size: 40rpx;
	}
	.Introduction{
		position: absolute;
		width: 686rpx;
		height: 160rpx;
		left: 32rpx;
		top: 1090rpx;
		
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 12rpx rgba(0, 0, 0, 0.06);
		border-radius: 16rpx;
	}
	.Introduction .logo{
		width: 212rpx;
		height: 148rpx;
		display: block;
		position: absolute;
		right: 16px;
		top: 3px;
	}
	.Introduction .text{
		display: block;
		position: absolute;
		width: 160rpx;
		height: 56rpx;
		left: 32rpx;
		top: 52rpx;
		line-height: 56rpx;
		font-weight: bold;
		font-size: 40rpx;
	}
	.center{
		position: absolute;
		width: 686rpx;
		height: 514rpx;
		left: 32rpx;
		top: 552rpx;
		
		background: #FFFFFF;
		box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.06);
		border-radius: 8px;
	}
	.center .text1{
		height: 44rpx;
		width:128rpx ;
		display: block;
		line-height: 44rpx;
		font-size: 32rpx;
		position: absolute;
		left: 108rpx;
		top: 168rpx;
		color: rgba(0, 0, 0, 0.85);
		text-align: center;
	}
	.center .text2{
		height: 44rpx;
		width:128rpx ;
		line-height: 44rpx;
		font-size: 32rpx;
		position: absolute;
		right: 108rpx;
		top: 168rpx;
		color: rgba(0, 0, 0, 0.85);
		text-align: center;
	}
	.center .text3{
		height: 44rpx;
		width:128rpx ;
		line-height: 44rpx;
		font-size: 32rpx;
		position: absolute;
		left: 108rpx;
		top:426rpx;
		color: rgba(0, 0, 0, 0.85);
		text-align: center;
	}
	.center .text4{
		height: 44rpx;
		width:128rpx ;
		line-height: 44rpx;
		font-size: 32rpx;
		position: absolute;
		right: 108rpx;
		top:426rpx;
		color: rgba(0, 0, 0, 0.85);
		text-align: center;
	}
	.center .product1{
		width: 108rpx;
		height: 108rpx;
		position: absolute;
		top:44rpx;
		left:118rpx;
	}
	.center .product2{
		width: 108rpx;
		height: 108rpx;
		position: absolute;
		top:44rpx;
		right:118rpx ;
	}
	.center .product3{
		width: 108rpx;
		height: 108rpx;
		position: absolute;
		top:302rpx;
		left:118rpx;
	}
	.center .product4{
		width: 108rpx;
		height: 108rpx;
		position: absolute;
		top:302rpx;
		right:118rpx ;
	}
	.center .line2{
		position: absolute;
		width: 638rpx;
		height: 2rpx;
		left: 24rpx;
		top: 256rpx;
		
		background: rgba(0, 0, 0, 0.05);
	
	}
	.center .line1{
		position: absolute;
		width: 466rpx;
		height: 2rpx;
		left: 100rpx;
		top: 256rpx;
		background: rgba(0, 0, 0, 0.05);
		transform: rotate(90deg);
	}
	
</style>